<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <link rel="stylesheet" href="./../../helpwin.css">
      <title>MATLAB File Help: prtRvIndependent/prtRvIndependent</title>
   </head>
   <body>
      <!--Single-page help-->
      <table border="0" cellspacing="0" width="100%">
         <tr class="subheader">
            <td class="headertitle">MATLAB File Help: prtRvIndependent/prtRvIndependent</td>
            
            
         </tr>
      </table>
      <div class="title">prtRvIndependent/prtRvIndependent</div>
      <div class="helptext"><pre><!--helptext -->  <span class="helptopic">prtRvIndependent</span>  Independent random variables
 
    RV = <span class="helptopic">prtRvIndependent</span> creates a <span class="helptopic">prtRvIndependent</span> object.
    <span class="helptopic">prtRvIndependent</span> objects enable the training of independent
    versions of a base random variable type on each column of a data
    set.  By default, <span class="helptopic">prtRvIndependent</span> assumes Gaussian distributed
    random variables.
 
    RV = <span class="helptopic">prtRvIndependent</span>('baseRv', VALUE) specifies the type of RV to
    be trained on each column of input data.  VALUE must specify a
    valid prtRV class.  By default the baseRv field is a
    <span class="helptopic">prtRvIndependent</span>.
 
    RV = <span class="helptopic">prtRvIndependent</span>(PROPERTY1, VALUE1,...) creates a
    <span class="helptopic">prtRvIndependent</span> object RV with properties as specified by
    PROPERTY/VALUE pairs.
 
    A <span class="helptopic">prtRvIndependent</span> object inherits all properties from the prtRv
    class. In addition, it has the following properties:
 
    baseRv          - A prtRv object specifying the type of classifier
                      to create independent versions of.
 
    rvArray         - An array of objects of type baseRv that are
                      generated by calling the MLE method.  Can also be
                      manually set to specify particular parameters.
    
   A <span class="helptopic">prtRvIndependent</span> object inherits all methods from the prtRv class. 
   The MLE method can be used to estimate the distribution parameters from
   data.
 
   Example:
 
   dataSet    = prtDataGenUnimodal;   % Load a dataset consisting of 2
                                      % classes
   % Extract one of the classes from the dataSet
   dataSetOneClass = prtDataSetClass(dataSet.getObservationsByClass(1));
 
   mvnRv = <span class="helptopic">prtRvIndependent</span>;            % Create a <span class="helptopic">prtRvIndependent</span>
                                        % object, with mvn components
   mvnRv = mvnRv.mle(dataSetOneClass);  % Compute the maximum
                                        % likelihood estimate from the
                                        % data
 
   indepRv = <span class="helptopic">prtRvIndependent</span>;          %Created an indepednent RV
                                        %(default baseRv is gaussian)
 
   indepRv = indepRv.mle(dataSetOneClass);
 
   subplot(2,2,1); mvnRv.plotPdf; 
   hold on; dataSetOneClass.plot;
   title('MVN RV Pdf');
 
   subplot(2,2,2); indepRv.plotPdf; 
   hold on; dataSetOneClass.plot;
   title('Independent Gaussian RV Pdf');</pre></div><!--after help --><!--seeAlso--><div class="footerlinktitle">See also</div><div class="footerlink"> <a href="./../prtRv.html">prtRv</a>, <a href="./../prtRvGmm.html">prtRvGmm</a>, <a href="./../prtRvMultinomial.html">prtRvMultinomial</a>, <a href="./../prtRvUniform.html">prtRvUniform</a>,
    <a href="./../prtRvUniformImproper.html">prtRvUniformImproper</a>, <a href="./../prtRvVq.html">prtRvVq</a>, <a href="./../prtRvDiscrete.html">prtRvDiscrete</a>
</div>
   </body>
</html>